home *** CD-ROM | disk | FTP | other *** search
- >>>>> Tim Boemker <tjb839@zacatecas.optimum.com> writes:
-
- > Many times in working with STL I've wished for a new operator to return
- > the type of an expression, much the same way sizeof returns the size of
- > an expression.
-
- > It would allow programs like the following, for example:
-
- > set<foo, less<foo> > s;
- > for(typeof(s)::iterator i = s.begin(); i != s.end(); i++)
- > // do something
-
- > I suppose this must have been considered by now. Has anything come of
- > it?
-
- It has come up in the committee, but no-one has made a formal proposal, and
- it's too late now.
-
- g++ has had typeof for a very long time; I believe some other compilers
- (Metaware?) have similar functionality with a different name.
-
- Jason
-
-
- [ comp.std.c++ is moderated. To submit articles: Try just posting with your
- newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
- comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
- Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-